/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.tewi.controller;

import javax.transaction.UserTransaction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pl.tewi.contexts.ApplicationServerContext;
import pl.tewi.controllers.ServerController;
import pl.tewi.exceptions.GeneralFrameworkException;

/**
 * Domyślny moduł zarządzania serwerem aplikacyjnym
 * @author Marcin Kwapisz
 */
public class DummyServerController implements ServerController {

    private static final Logger LOGGER = LoggerFactory.getLogger(DummyServerController.class);
    private final ApplicationServerContext context;

    public DummyServerController(final ApplicationServerContext context) {
        this.context = context;
    }

    @Override
    public void startEmbeddedServer() throws GeneralFrameworkException {
        LOGGER.info("Starting dummy application server");
    }

    @Override
    public void stopEmbeddedServer() throws GeneralFrameworkException {
        LOGGER.info("Stopping dummy application server");
    }

    @Override
    public void deployApplication() throws GeneralFrameworkException {
        LOGGER.info("Deploying application on application server");
    }

    @Override
    public void deployApplicationResources() throws GeneralFrameworkException {
        LOGGER.info("Configuring application resources on application server");
    }

    @Override
    public void configureSecuritySettings() throws GeneralFrameworkException {
        LOGGER.info("Configuring security settings on application server");
    }

    @Override
    public UserTransaction getCurrentTransaction() {
        LOGGER.info("Getting current transaction");
        return null;
    }

    @Override
    public void injectResources(final Object test, final String runAsUser) throws GeneralFrameworkException {
        LOGGER.info("Injecting resources");
    }

    public void login(final String user, final String password) {
        LOGGER.info("login");
    }

    public void logout() {
        LOGGER.info("logout");
    }
}
